//
//  ZBLoginCell.m
//  ZhiBo
//
//  Created by huangtie on 2017/11/5.
//  Copyright © 2017年 huangtie. All rights reserved.
//

#import "ZBLoginCell.h"

@interface ZBLoginCell()<UITextFieldDelegate>

@end

@implementation ZBLoginCell

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.size = CGSizeMake(SCREEN_WIDTH, 65);
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        UIView *rect = [[UIView alloc] init];
        rect.size = CGSizeMake(self.width - 140, 45);
        rect.backgroundColor = UICOLOR_ARGB(0xffebebeb);
        rect.layer.cornerRadius = rect.height / 2;
        rect.clipsToBounds = YES;
        rect.centerX = self.width / 2;
        rect.centerY = self.height / 2;
        [self addSubview:rect];
        
        self.textField = [[UITextField alloc] init];
        self.textField.size = CGSizeMake(rect.width - 60, rect.height - 20);
        self.textField.centerX = rect.width / 2;
        self.textField.centerY = rect.height / 2;
        self.textField.font = FONT_NORMAL_14;
        self.textField.textColor = UICOLOR_ARGB(0xff333333);
        self.textField.returnKeyType = UIReturnKeyDone;
        self.textField.delegate = self;
        [rect addSubview:self.textField];
    }
    return self;
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [self endEditing:YES];
    return NO;
}

@end
